<template>
  <h3>子组件</h3>
  <p>a 的值是：{{ a }}</p>
  <p>b 的值是：{{ b }}</p>
  <button @click="b--">b--</button>
</template>

<script setup>
import { ref } from 'vue'

const a = 1
const b = ref(0)

const increment = (step = 1) => {
  b.value += step
}

defineExpose({
  a,
  b,
  increment
})
</script>

<style scoped></style>
